import request from '@/config/axios'
/**
 * 分页查询
 */
export const pageQuery = (params) => {
  return request.get({ url: '/mailbox/mailbox-account/page-query', params })
}

/**
 * 新增
 */
export const create = (data) => {
  return request.post({ url: '/mailbox/mailbox-account/create', data })
}

/**
 * 更新
 */
export const update = (data) => {
  return request.put({ url: '/mailbox/mailbox-account/update', data })
}

/**
 * 删除
 */
export const deleted = (id) => {
  return request.delete({ url: '/mailbox/mailbox-account/deleted?id=' + id })
}

/**
 * 获取单个邮箱账号
 */
export const singleGet = (id) => {
  return request.get({ url: '/mailbox/mailbox-account/single-get?id=' + id })
}

/**
 * 获取前x的邮箱账号
 */
export const getTopAccount = (userId) => {
  return request.get({ url: '/mailbox/mailbox-account/get-top-account?userId=' + userId })
}
